Authenticating user sessions based on reputation of user locations

ABSTRACT

User sessions are authenticated based on locations associated with a user account used for sending a request for creating a session. Examples of locations of a source of a request include a geographical location, a network address, or a machine cookie associated with a device sending the request. Locations of the request are compared with stored safe locations associated with the user account and a suspiciousness index is determined for the session. The level of authentication required for the session is determined based on the suspiciousness index. Locations are associated with a reputation based on past history of sessions originating from the locations. A location associated with a history of creating suspicious session is considered an unsafe location. Reputation of the location originating the session is used to determine the level of authentication required for the session.

CROSS REFERENCES TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.61/140,928, filed Dec. 26, 2008, and U.S. Provisional Application No.61/144,711, filed Jan. 14, 2009, each of which is incorporated byreference in its entirety.

BACKGROUND

This invention relates to preventing illegitimate use of compromisedaccounts, such as account for which the credentials have been stolen byphishing sites.

Phishing is a fraudulent attempt to obtain confidential information fromusers, such as user names, passwords, account numbers and the like, bypretending to be a legitimate online entity. A fraudulent websitepresents a look and feel that is almost identical to a legitimatewebsite that may be a popular and trusted website. Unsuspecting userswho are unaware that they are interacting with a fraudulent websiteprovide sensitive information to the fraudulent website. For example, auser may be habitually accustomed to providing username and password toa social networking website frequently visited by the user. On aspecific occasion, if the user is presented with a fraudulent websitethat has the look and feel of the social networking website, the usermay proceed by providing his user name and password to the fraudulentwebsite. The fraudulent website obtains the user name and password ofthe user and can subsequently use it for unauthorized access to thesocial networking website. Similarly, a fraudulent website may be ableto collect sensitive information, for example, credit card numbers,social security numbers, or date or birth of users by pretending to looklike a legitimate website. Once user credentials have been compromised,the stolen credentials can be used for illegitimate purposes. Damagesfrom phishing include stealing of information as well as substantialfinancial losses.

Strategies for counteracting phishing include training people todistinguish phishing websites from legitimate websites. Users may beencouraged to contact the company hosting the website in case of anysuspicion related to the website. Users are encouraged to verify theuniform resource locator (URL) address displayed in an Internet browserto ensure that they are in fact accessing the website that they intendto access. To avoid phishing, some websites require enhancedauthentication procedures, for example, by requesting the user toidentify an image preselected by the user. Once a user's account hasbecome compromised, however, websites must try to prevent or limit thedamage caused by phishing by determining whether a user session islegitimate or is from an unauthorized person who obtained a user'saccount information unlawfully.

SUMMARY

Embodiments of the invention allow authentication of user sessions basedon reputation of locations associated with user sessions. A locationassociated with a request for information received from a computingdevice is identified. A measure of reputation associated with thelocation is received. The measure of reputation of the location isdetermined based on statistical information of suspicious sessionsoriginating from the location. The measure of reputation of the locationis used to determine the level of authentication required from thesender of the request. Based on the level of authentication required, arequest for authentication is sent.

In one embodiment, if the reputation of the location indicates that thelocation originated more than a threshold number of suspicious sessionsin the past, the location is considered unsafe. In another embodiment,the reputation of a location may be based on the reputation of aneighboring location. In another embodiment, the reputation of alocation may be based on the distance of the location from a neighboringlocation. Embodiments determine past sessions as suspicious if thesessions are associated with illegitimate activities, or if the sessionsrequest information that is considered sensitive, or if the sessionsfail authentication. The information for determining a measure ofreputation of location may be obtained from a third party.

In one embodiment, a server determines measures of reputations oflocations and stores them. Information related to sessions originatingfrom a location is received. A measure of suspiciousness indicatingauthenticity of the session originating from the location is determined.A measure of reputation of the location is determined based on anaggregate of measures of suspiciousness of sessions originating from thelocation. The measure of reputation of the location is used to determinethe level of authentication required for subsequent sessions originatingfrom the location. The measure of reputation associated with thelocation is stored in a computer readable medium.

The features and advantages described in this summary and the followingdetailed description are not all-inclusive. Many additional features andadvantages will be apparent to one of ordinary skill in the art in viewof the drawings, specification, and claims hereof.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of the system architecture of a website, inaccordance with an embodiment of the invention.

FIG. 2 illustrates a process of building a store of bad locations basedon session data.

FIG. 3 is a high-level diagram illustrating how locations associatedwith a session created by a user can be used to distinguish betweenillegitimate user sessions and legitimate user sessions.

FIG. 4 is a flowchart of the process illustrating how a suspicious indexis determined for a user session.

FIG. 5 is a flowchart of a process illustrating how information relatedto a session being suspicious is used to determine the level ofauthentication required to allow access to the website.

The figures depict various embodiments of the present invention forpurposes of illustration only. One skilled in the art will readilyrecognize from the following discussion that alternative embodiments ofthe structures and methods illustrated herein may be employed withoutdeparting from the principles of the invention described herein.

DETAILED DESCRIPTION

When a user interacts with a website, a session is created by thewebsite for the user interaction. The user interaction may involve theuser logging into the website or accessing a webpage from the website.The website can analyze the user session to gather location informationassociated with the client device and/or the session. The informationassociated with the client device used for the session includesgeographical location, attributes of the physical machine used by theuser, the network address associated with the session created by theuser and the like. A typical user is likely to create a session from thesame set of locations on a regular basis, for example, a person mayconnect daily from a home computer or a work computer. A user is alsolikely to connect from another computer within a reasonable distance ofhis home or work, for example, from a computer in a library. However auser is less likely to connect from a computer that is very far from theusual locations associated with the user. Accordingly, a session createdfrom a new distant location can be considered suspicious and may requirehigher level of authentication. A suspicious session is a session thathas a greater than a threshold likelihood of being created by a userthat is not authorized to use the user account associated with thesession. An authorized user of a user account can be a user that createdthe session or a user who is legitimately permitted to create a sessionusing the user account. For example, a user that creates a session usingcredentials stolen by a phishing website is not an authorized user ofthe user account. Higher the level of authentication passed by asession, lower the likelihood of the session being created by anunauthorized user. User locations, for example, geographical locationsor netblocks originating sessions can be associated with a reputationbased on past history of sessions created from the locations. An attemptto create a session from a location with a history of suspicioussessions can be considered suspicious, thereby requiring higher level ofauthentication.

System Architecture

FIG. 1 is a high level block diagram illustrating a system environmentsuitable for operation of a social networking system that preventsphishing attacks from fraudulent websites. The system environmentcomprises one or more client devices 105, a social networking system115, and a network 110. In alternative configurations, different and/oradditional modules can be included in the system.

The client devices 105 comprise one or more computing devices that canreceive user input and transmit and receive data via the network 110.For example, the client devices 105 may be desktop computers, laptopcomputers, smart phones, personal digital assistants (PDAs), mobilephones, or any other device including computing functionality and datacommunication capabilities. The client devices 105 are configured tocommunicate via network 110, which may comprise any combination of localarea and/or wide area networks, using both wired and wirelesscommunication systems.

FIG. 1 contains a block diagram of the social networking system 115. Thesocial networking system 115 includes a web server 120, an action logger125, a session manager 135, a suspicious index manager 130, anauthentication manager 160, an action log 140, a user profile store 150,a safe locations database (DB) 155, a known phisher DB 145, and aconnection store 165. In an embodiment, the social networking system 115can be a website. In other embodiments, the social networking system 115may include additional, fewer, or different modules for variousapplications. Conventional components such as network interfaces,security mechanisms, load balancers, failover servers, management andnetwork operations consoles, and the like are not shown so as to notobscure the details of the system.

The social networking system 115 comprises a computing system thatallows users to communicate or otherwise interact with each other andaccess content as described herein. The social networking system 115stores user profiles that describe the users of a social network,including biographic, demographic, and other types of descriptiveinformation, such as work experience, educational history, hobbies orpreferences, location, and the like. The social networking system 115further stores data describing one or more connections between differentusers in the connection store 165. The connection information mayindicate users who have similar or common work experience, groupmemberships, hobbies, or educational history. Additionally, the socialnetworking system 115 includes user-defined connections betweendifferent users, allowing users to specify their relationships withother users. For example, these user defined connections allow users togenerate relationships with other users that parallel the users'real-life relationships, such as friends, co-workers, partners, and soforth. Users may select from predefined types of connections, or definetheir own connection types as needed.

The web server 120 links the social networking system 115 via thenetwork 110 to one or more client devices 105; the web server 120 servesweb pages, as well as other web-related content, such as Java, Flash,XML, and so forth. The web server 120 may include a mail server or othermessaging functionality for receiving and routing messages between thesocial networking system 115 and the client devices 105. The messagescan be instant messages, queued messages (e.g., email), text and SMS(short message service) messages, or any other suitable messagingtechnique.

The session manager 135 handles sessions created by the client device105 during interactions with the social networking system 115. Forexample, a session is created when a user uses a client device 105 tolog into the social networking system 115 or fetches web pages from thesocial networking system 115. The session manager 135 can analyze theinformation received from the client device 105 to identify informationassociated with the client device 105 based on communications with theclient device 105, for example, the internet protocol (IP) address usedby the client device for communicating with the social networking system115 or machine cookies stored on the client device 105.

The suspicious index manager 130 obtains the information associated witha session created by the user and analyzes the information to determinethe probability that the session was created for a legitimate use by theauthentic user of the account as compared to an illegitimate use bysomeone who stole the user's credentials. The suspicious index can be inthe form of a numerical score assigned to a user session indicating thechances that the session is created by an illegitimate user or it can bea value from a predetermined set of values indicating the degree ofsuspicion associated with the session's authenticity, for example, low,medium, or high degree of suspicion. In another embodiment, thesuspicious index can be a binary value indicating whether the usersession is safe or not safe. The suspicious index associated with asession may be provided to other modules or systems within the socialnetworking system 115 in real-time as new sessions are created.Alternatively, the suspicious index may be used by off-line applicationsthat perform batch processing, for example, based on informationavailable in the action log 140. For example, an application can performstatistical analysis of illegitimate activity associated with useraccounts on the social networking system 115.

The authentication manager 160 obtains user credentials from a usercreating a session and authenticates actions based on the session. Forexample, the login and password information is collected from a user andverified against information from the user profile store 150 beforeallowing the user access to information. Based on the degree ofsuspicion associated with a user session as determined by the suspiciousindex manager 130, the authentication manager 160 may require differentlevels of authentication from a user before allowing access to the userbased on the user session. For example, a low degree of suspicionassociated with a session may result in authentication manager allowingaccess to information with simple authentication based on login andpassword. On the other hand a highly suspicious index associated with asession by the suspicious index manager may cause the authenticationmanager to require additional authentication or to use a moresophisticated authentication mechanism that results in a higher rate ofsuccess compared to simpler authentication mechanisms.

In one embodiment, additional logging is performed when a session isdetermined to be suspicious to enable subsequent analysis of thesuspicious sessions. Some embodiments may send alerts to appropriaterecipients when a session is determined to be highly suspicious. Therecipients of the alerts can take appropriate remediation actiondepending on the severity of the actions taken by a suspicious session.

The action logger 125 is capable of receiving communications from theweb server 120 about user actions on and/or off the social networkingsystem 115. The action logger 125 populates the action log 140 withinformation about user actions to track them. Any action that aparticular user takes with respect to another user is associated witheach user's profile, through information maintained in a database orother data repository, such as the action log 140. Such actions mayinclude, for example, adding a connection to the other user, sending amessage to the other user, reading a message from the other user,viewing content associated with the other user, attending an eventposted by another user, among others. In addition, a number of actionsdescribed below in connection with other objects are directed atparticular users, so these actions are associated with those users aswell. When a user takes an action on the social networking system 115,the action is recorded in an action log 140. In one embodiment, thesocial networking system 115 maintains the action log 140 as a databaseof entries. When an action is taken on the social networking system 115,the social networking system 115 adds an entry for that action to thelog 140.

The known phisher DB 145 stores information associated with sessionsthat have been used by illegitimate users of compromised credentials inthe past. An illegitimate user can be any attacker, adversary, or aphisher who has stolen login credentials of a user and attempts to usethe stolen credentials to create a session for illegitimate activity,for example spamming. This information is stored for ready access torecognize if a session is illegitimate by verifying the sessionattributes against the information stored in the known phisher DB 145.Such sessions may be immediately denied access. The known phisher DB 145also stores information derived from the information on suspicioussessions. For example, the known phisher DB may store a list of unsafenetblocks that have originated unsafe sessions in the past as well aslist of safe netblocks that have originated safe sessions in the past. Anetblock is a set of internet protocol (IP) addresses that are groupedtogether. For example, a netblock can be represented as a range of IPaddresses comprising a start IP address and an end IP address. Anetblock may be associated with an organization or a location. Inanother embodiment, the known phisher DB stores a list of knownnetblocks with each netblock associated with a safety metric indicatinghow safe the sessions originating from the netblock have been in thepast. The suspicious index manager 130 uses the information from theknown phisher DB 145 to determine the suspicious index associated with anew session that connects with the social networking system 115. Forexample, a session originating from a netblock considered unsafe basedon historical data associated with the netblock can be assigned asuspicious index value indicating the session as highly suspicious.

FIG. 1 shows the safe locations DB 155 that stores informationassociated with each user based on sessions created in the past thathave been properly authenticated and determined to be created bylegitimate users. The information associated with a user can beretrieved from the safe locations DB 155 given parameters associatedwith the user to identify the user. The information in the safelocations DB 155 is used by the suspicious index manager 130 todetermine the suspicious index of a user session. The information storedin the safe locations DB 155 is accumulated over time as the usercreates more and more sessions. The information may be collected throughoffline processes that analyze information available in action log 140or collected in real time as user sessions are created, and the qualityof the process for determining the safety of subsequent user sessions islikely to improve over time. A new session created by a user thatmatches information associated with the user in the safe locations DB155 is more likely to be a legitimate session. On the other hand asession associated with information that is drastically different fromthe information available in the safe locations DB 155 is highlysuspicious and may be considered a session created by an illegitimateuser, unless the session passes through enhanced authentication. Forexample, if a geographic location associated with the session is veryfar from all geographical locations associated with the user stored inthe safe locations DB 155, the session may be considered highlysuspicious. The locations of the session may be added to the safelocations DB 155 if the session passes the required enhancedauthentication.

In an embodiment, statistical information based on locations associatedwith a user stored in the safe locations DB can be analyzed to classifythe user behavior for use in determining suspiciousness of future usersessions. For example, if the safe locations of a user are typically farapart from each other on a regular basis, the user may be a travellinguser, for example, a sales person. In this case, a new session that isassociated with a geographical location that is far from the existingsafe locations of the user may not be considered a highly suspicioussession. On the other hand, if the safe locations associated with theuser are typically restricted to a very small geographical region, theuser is not likely to travel a lot. Hence, a new session associated witha geographical location that is far from the existing safe locations ofthe user may be considered a highly suspicious session and may requireenhanced authentication procedure.

Using the Reputation of a Session's Origin Location

In one embodiment, data regarding user sessions are analyzed todetermine whether user sessions are associated with potentially harmfulbehavior (e.g., activities representing spamming, phishing, or otherimproper behavior). For example, an illegitimate session created usingstolen credentials from the user from a vetted geographical location ofa user may be considered not-suspicious and allowed access. Howeverinformation related to activities of the session is stored in action log140 and can be analyzed by a post-processing step. Embodiments of aprocess for analyzing whether a session is suspicious are described infurther details below. Based on the analysis, if it is determined thatthe session was involved in illegitimate activities, the session may beconsidered invalid, or suspicious, and the suspiciousness measure of thelocation from which the session originated may be high, indicating thelocation as more suspicious. In one embodiment, a netblock associatedwith a large number of suspicious sessions (e.g., above a predeterminedthreshold) that were not properly authenticated may be considered a badlocation.

If a sufficient number of user sessions are determined to be suspiciousfor a particular netblock, the netblock is considered bad, or unsafe.The netblocks considered not safe are stored in a database thatmaintains a list of unsafe netblocks. Netblocks that are known to be“safe” (e.g., having a relatively low rate of invalid sessions) may alsobe maintained in a list of safe netblocks. In some embodiments,locations other than netblocks can be stored in a database of badlocations. For example, IP addresses obtained from invalid sessions canbe stored in a list of bad IPs. Alternatively, geographical locationsthat have a high rate of invalid sessions are considered not safe andstored in a database that maintains a list of unsafe geographicallocations. Geographical locations that are known to be “safe” (e.g.,having a relatively low rate of invalid sessions) may also be maintainedin a list of safe geographical locations. The safe and unsafegeographical locations lists can be used similar to the safe and unsafenetblock lists to determine safety of sessions.

FIG. 2 describes a process of building a store of bad locations based ondata collected for sessions. On an ongoing basis, data is collected 200for sessions, for example by logging in the action log 140. The datacollected for sessions includes whether the sessions were suspicious andthe location (e.g., netblock) from which the sessions originated. Thesession data collected is examined by the suspicious index manager 130to determine 210 whether each session is suspicious. The suspiciousindex manager 130 uses the information related to suspicious sessions todetermine 220 whether certain locations (e.g., netblocks) are suspiciousor “bad” locations. For example, a netblock may be determined to be a“bad” location if it is a location for a number of suspicious sessionsabove a predetermined threshold. A list of the bad locations is computedand stored or added 230 to a previously stored list of bad locations.The list of bad locations is used 240 to determine if a new user sessionis suspicious. A session with a location that belongs to the list of badlocations may be required to pass an enhanced authentication. Forexample, the check 510 in FIG. 5 described in further details below mayuse the list of bad locations as a factor in determining if a session issuspicious or not.

When the session manager 135 creates a new user session, the sessionmanager 135 checks the netblock of the new session against the list ofunsafe netblocks (and optionally the list of safe netblocks) stored inthe known phisher DB 145 to determine if the netblock has a badreputation based on the gathered historical data. If the session manager135 finds the netblock of the new session in the unsafe list ofnetblocks, the new session may be considered highly suspicious.Alternatively, if the netblock of the new session is found in the safenetblock list, the session may be considered less suspicious. If a newuser session is considered suspicious, the authentication manager 160may apply an enhanced or more difficult authentication procedure, suchas a captcha, an additional password, or other security verificationmechanism. Embodiments of enhanced authentication procedures aredescribed in further details below.

An alternative embodiment maintains a list of known netblocks andassociates each netblock with a safety metric indicative of the degreeof safety of sessions originating from the netblock in the past. Thenetblock associated with the new user session is determined to be safeor unsafe by comparing the suspicious index associated with the netblockwith predetermined threshold values. For example, a netblock with asuspicious index value above a predetermined threshold may be consideredunsafe. Hence, a netblock can be classified based on the degree ofsafety based on historical data associated with the netblock. The safetymetric associated with a netblock is used in subsequent sessions todetermine their suspicious index. A session originating from a netblockwith safety metric indicative of low safety is considered suspicious andmay be subjected to enhanced authentication.

The suspicious index manager 130 may determine the reputation of anetblock based on an aggregate value determined based on reputations ofindividual network addresses within the netblocks. The netblock may beconsidered unsafe if the percentage of network addresses that areconsidered suspicious is above a predefined threshold. A network addressis considered suspicious if sessions created using the network addressare considered suspicious. A session is considered suspicious if thesession either fails authentication or attempts to access sensitiveinformation. Each network address of the netblock may be associated witha safety metric indicative of the suspiciousness of network address. Thesafety of the netblock is determined based on a statistical measurebased on an aggregate value of the safety metrics for all the networkaddresses in the netblock. In an embodiment, the reputation of ageographical location is based on the reputation of netblocks within thegeographical location. If the geographical location is associated with asingle netblock, the safety metric associated with the geographicallocation is determined based on the reputation of the associatednetblock. If the geographical region is associated with multiplenetblocks, the reputation of the geographical location may be based on astatistical aggregate value of metrics associated with reputations ofnetblocks within the geographical location. In an embodiment, thereputation of a geographical location may be determined on the basis ofhierarchical decomposition of the geographical location into smallergeographical location and recursively combining the reputation of thesmaller geographical locations.

In some embodiments, user behavior indicative of actions that are notuseful for illegitimate purposes can be considered an indication thatthe locations associated with the session are safe. The types of actionsthat are unlikely to be useful for illegitimate purposes will varywidely depending on the type of system the users are interacting with.It will be appreciated that any number of actions can be used as anindication of legitimate behavior, and these actions may be observed anddetermined empirically for each particular system with which embodimentsof the invention are used. One source of legitimate actions may include,for example, accessing data from the social networking system 115, forexample by browsing parts of a website that are unlikely to be of valuefor illegitimate purposes.

In an embodiment, the suspicious index manager 130 analyzes requestsreceived from each session. The suspicious index manager 130 canclassify requests as benign requests and potentially malicious requests.A benign request is a request that is unlikely to be of use forillegitimate purposes. For example, accessing a photo posted by aconnection of the user in a social networking system is not likely to beof use for illegitimate purposes. On the other hand, attempts to accesssensitive information, for example, social security number may beconsidered a potentially malicious request. In an embodiment, scores areassigned to different types of requests based on the degree of potentialharm that a request can be associated with. The request pattern from asession can be analyzed to see the overall degree of potential harmassociated with the request. The potential degree of harm associatedwith a session is determined based on statistical aggregate valueobtained from measures of potential degree of harm of various requestsassociated with the session. A session sending a number of requests withan overall high degree of potential harm may be classified by thesuspicious index manager 130 as a suspicious session.

In some embodiments, the netblock can be associated with geographicallocations. Hence, the geographical distance between two netblocks can beestimated based on the geographical locations associated with the twonetblocks. The geographical distance between netblocks can be used toderive safety information of sessions. For example, a session createdfrom a netblock that has never been used by a user and is therefore notavailable in the list of safe or unsafe locations can be analyzed forits distance compared to known netblocks. A netblock within apredetermined distance of an unsafe netblock can be consideredsuspicious and require enhanced authentication. On the other hand anetblock within a predetermined distance of a safe netblock can beconsidered less suspicious and may require less severe authentication.

In another embodiment, information based on third party providers may beused for determining if a location is safe or unsafe. For example, atrusted third party provider may provide information that a netblock orIP address is not safe. Since the source of information is trusted, thelocations determined to be unsafe by the third party provider can beadded to a list of bad netblocks. In some embodiments a netblock thathas been vetted for several other users or considered safe by a thirdparty trusted source can be considered a safe location. This heuristicis based on the assumption that non-suspicious users are likely to occurin similar geographical locations or netblocks.

In an embodiment, geographical location from where a user session iscreated may be determined based on alternative means that are differentfrom netblock associated with the user session. For example, thelocation of the device originating a session may be determined based ona global positioning system (GPS). The location identified by the GPSsystem or any alternative mechanism can be checked against a database ofreputation of locations determined based on reputation of netblocksassociated with the geographical locations. The reputation of thegeographical location is used to determine the level of authenticationrequested from the session before access to information is allowed tothe session.

Tracking Safe Locations of Users

In one embodiment, the system tracks a set of “safe” locations for eachof the users. A location is an attribute of a session that is indicativeof the client device 105 used for creating the session. A locationassociated with a session that has been successfully authenticated by auser is called a safe location. The safe locations associated withdifferent users of the social networking system 115 are stored in thesafe locations DB 155. A metric called suspicious index is created fornew sessions based on locations of the session and historical data basedon sessions created by the user in the past or netblock reputation thatindicates how safe the session is estimated to be. Based on the value ofthe suspicious index of the session a determination is made regardingthe severity of authentication required for the session.

Following are examples of locations that may be associated withsessions:

-   (1) Geographical location: The geographical location associated with    the client device 105 can be obtained using the IP (internet    protocol) address associated with the source of the user session. In    one embodiment the geographical location is the city from where the    session is created. The city associated with an IP address can be    determined by using a lookup based on a table mapping cities to    ranges of IP addresses. In an embodiment, the geographical location    for a device may be determined using a GPS located on the device    sending the request.-   (2) Network Location: The network location of session can be    obtained from the IP address associated with the session. In some    embodiments, the network location is represented as a netblock that    identifies a group of IP addresses. The netblock associated with an    IP address can have a high correlation with the geographical    location associated with the IP address. In some embodiments, an    autonomous system number (ASN) can be obtained from the session that    allows identification of a network associated with the session.-   (3) Machine (cookie): The social networking system 115 can send a    machine cookie to a client device 105 that is stored locally on the    client device 105 and is unique to the client device with respect to    the social networking system 115. The machine cookie can be    retrieved by the social networking system 115 to verify the identity    of the client device 105. In one embodiment, the machine cookie is a    64-character string. The machine cookie is a highly reliable    mechanism for recognizing a client device 105. For a cookie to be    available on the client device 105, the client device must have    previously established a connection with the social networking    system 115 allowing a cookie to be stored on the device. If the    cookie is deleted by the user, a new cookie may be stored on the    device the next time the device is used to connect to the social    networking system 115.

As shown in FIG. 3, a user Joe may use the location 305 to connect fromhome and location 310 to connect from work with the help of the network350. Occasionally the user may create a session from an alternatelocation 315. For example, the user visiting a friend's house mayconnect (create a session) from the friend's computer. However, thechances of a user creating a session from a location drasticallydifferent from the usual set of locations are low. For example, it isunlikely that the user would create a session from computer 320,situated far from the usual locations associated with the user. Asession created from a location that is drastically different from theusual locations of a user is suspected to be an illegitimate session,e.g., created by a phisher who stole the user's credentials. Similarly,a session may be considered suspicious if it is created from a locationthat has a history of creating suspicious sessions or a history ofsessions that have been involved in illegitimate activity like spamming.A session considered suspicious may be subjected to additionalauthentication by the user and actions performed by the session may bemonitored more closely for illegitimate activity.

FIG. 3 illustrates a system 325 that maintains information in the safelocations DB 155 that can be used to determine whether a session is safeor not. For example, the safe locations DB 155 stores the informationthat the safe geographical locations used by Joe in the past include LosAltos and Sunnyvale, the safe netblocks used by Joe include N1 and N2and safe cookies stored on Joe's computers include C1 and C2. A usersession from the computer 305 can be considered safe since it isassociated with geographical location Los Altos and netblock N1 that areknown safe locations for user Joe. Similarly, a user session createdfrom computer 310 can also be considered safe since it has a knownmachine cookie C1 even though the geographical location Palo Alto andnetblock N3 have never been used before by Joe. The user session fromcomputer 315 can also be considered safe although the geographicallocation as well as the netblock and cookie not known to be safe sincethe geographical location is within a reasonable threshold, for example,within 50 miles of known geographical locations used by Joe, forexample, Los Altos. However the user session created from computer 320may be treated as somewhat suspicious until it is authenticated by theuser. A user session created from computer 320, although based oncredentials 340 of Joe is considered highly suspicious since thegeographical location, netblock and cookie of the user session havenever been used by Joe in the past as determined by the safe locationsDB 155 and the geographical location Atlanta is significantly far fromany location used by Joe in the past. Hence the user session createdfrom computer 320 can be considered safe only if the session passesenhanced authentication.

The safe locations DB 155 can be initially populated with a set oflocations based on historic information associated with user sessions.For example, session history may be stored in action log 140. Theoffline batch process, also referred to as offline vetting can analyzehistoric data associated with sessions to obtain safe locations for auser. The offline process can also be used to expand an existing set ofsafe locations for a user. The locations added to the safe locations DB155 for a user are the locations associated with sessions properlyauthenticated by the user, excluding known illegitimate locations thatmay be available in the known phisher DB 145. In some embodiments, safelocations based on machine cookies are not added during the initialpopulation of the safe locations DB 155. The login patterns of a userstored in the action log 140 can be analyzed to determine safe locationsfor a user. For example, a user exhibiting activity on the socialnetworking system 115 that is atypical of an illegitimate user (or,typical of a legitimate user) is considered evidence that the locationcan be considered vetted. Similarly a user logging repeatedly from thesame location for more than a predetermined number of times can beconsidered evidence that the location is safe. Once a location isdetermined safe and added to the safe location DB 130, the location canbe used by the user without requiring enhanced authentication.

The expanding of the safe locations associated with a user in the safelocations DB 155 occurs by the process of online vetting that refers toa process of determining safe locations based on live user sessions.FIG. 4 describes the process used to determine whether a locationassociated with a user session can be added to the safe locations DB 155and also to make a determination whether the session is suspicious ornot. The process illustrated in FIG. 4 determines the suspicious indexvalue for a user session to be one of “not suspicious,” “low-mediumsuspicious,” or “highly suspicious.” The flowchart in FIG. 4 can beadapted to return a binary suspicious index with two possible values,“safe” and “not safe,” for example, sessions determined to be “notsuspicious” or “low-medium suspicious” may be considered “safe” whereassessions determined to be “highly suspicious” considered “not safe.Alternatively, the suspicious index can be a numeric value based onweighted average of scores assigned to individual factors used todetermine how safe a session is. For example a score assigned to asession with a safe machine cookie may be higher than the score assignedto a session based on geographical location. Furthermore, the scoreassigned to a user session based on multiple safe locations can behigher than a session based on a single safe location.

When the session manager 135 creates 400 a user session, the sessionmanager 135 determines 405 locations associated with the session. Thesession manager 135 checks 410 the safe locations DB 155 to determine ifthere is any historical data available for the user. If no historicaldata exists for the user, the locations associated with the session areconsidered safe and added 415 to the safe locations DB 155. In anembodiment, enhanced authentication may be required before adding 415the locations associated with the session to the safe locations DB 155.The session is considered not-suspicious when there is no existinghistory in the safe locations DB 155 since it is likely to be one of thefirst sessions created by a user and is less likely to have been stolen.

If historical data is available for the user, the historical locationsretrieved from the safe locations DB 155 for the user are compared 420against the session locations. If any of the session locations match thehistorical locations of the user in the safe locations DB 155, thematching session location is considered vetted. A match between twolocations is successful if the two locations are considered equivalent.In an embodiment, the match is based on a string match, for example, twomachine cookies may be considered equivalent if they are exact stringmatches of each other. In another embodiment, the match may be a fuzzymatch and not necessarily an exact string match. For example, addressesof two geographical locations may be represented in different ways butconsidered a match if the analysis of the addresses indicates that thetwo addresses represent the same geographical location.

If a determination is made 425 that at least one session location isvetted, the session is considered not-suspicious and the remaininglocations associated with the session are added 430 to the safelocations DB 155. Each session that has at least one vetted location andother non-vetted locations results in the non-vetted locations beingadded to the safe locations DB 155, thereby expanding the information inthe safe locations DB 155. For example, if the netblock and geographicallocation associated with the user session are not vetted but the machinecookie is vetted, the session is likely to be created by a persontravelling with a laptop. Hence the vetting of the machine cookie issufficient to cause the session's geographical location and netblock tobe added to the safe locations DB 155. In some embodiments, a locationthat has not been used by a user for a period of time longer than apredetermined threshold value, for example thirteen months, the locationis removed from the list of safe locations for the user.

In some embodiments, if the user session is considered low-mediumsuspicious, the user is allowed access to the site based on enhancedauthentication that is simpler than the enhanced authentication requiredfor a highly suspicious session. In other embodiments, a user sessionconsidered low-medium suspicious may be allowed access to the websitebut monitored more closely for any suspicious activities. For example, alow medium suspicious session that engages in suspicious activityincluding spam can be terminated. Furthermore, the locations associatedwith the session that engages in suspicious activity can be added to theknown phisher DB 164 and the cookie and netblock added to a blockedlocations list for the user. The locations belonging to the blockedlocations list for a user are checked for determining the suspiciousindex for the user and may be regarded as highly suspicious forsubsequent sessions.

If none of the locations associated with the session can be vetted,heuristics can be used to determine 435 if any location associated withthe session can be considered safe. For example, a geographic locationcan be considered safe if it is within a predetermined distance of avetted geographic location. In a particular geographical region, peoplemay be expected to travel a threshold distance on an average forbusiness or personal reasons. If the new location associated with thesession is within a reasonable value of the threshold distance traveled,the location can be considered safe. On the other hand, if the newlocation is at a significant distance from any vetted location comparedto the threshold distance, the new location is not considered safe.

In some embodiments, a threshold distance may be predetermined for eachgeographical region. If at least one location is considered safe butnone of the locations associated with the session are vetted, thesession is considered 440 low-medium suspicious and the locationsassociated with the session may not be added to the safe locations DB155. If none of the locations are vetted or considered safe, the sessionis considered 445 highly suspicious and none of the locations associatedwith the session are added to the safe locations DB 155.

In some embodiments, if the machine cookie obtained from a session has alength different from an expected length, the session is consideredhighly suspicious. In some embodiments, the machine cookie is createdsuch that a part of the cookie is created by applying a hash algorithmto another part of the cookie. For example, the last 32-characters ofthe cookie may be created by applying a hash algorithm to the first32-characters. A check is made to verify if the session cookie wascreated by applying the appropriate algorithm. If the check indicatesthat the cookie was not created by the appropriate mechanism, thesession is considered highly suspicious.

Learning New Safe Locations for a User

The information available for a user in the safe locations DB 155increases over time based on the process described in FIG. 4. Locationinformation from a session that is not available in the safe locationsDB 155 can be added to the safe locations DB 155 in followingsituations:

-   (1) When a session with no known safe locations is properly    authenticated by the user. All locations associated with the session    can be added to the safe locations DB 155 as safe locations for the    user.-   (2) When some locations associated with the session are not known    safe locations but at least one location is determined to be a safe    location. The locations of the session that are not known safe    locations may be added to the safe locations DB 155. In some    embodiments, the location determined to be safe for the session must    be of a particular kind associated with very high reliability before    other locations of the session are added to the safe locations DB    155. For example, a session considered safe only because the    geographical location was determined safe may not result in the    other locations, for example, netblock and machine cookie getting    added to the safe locations DB 155. On the other hand, a session    created with a known safe location based on machine cookie may be    considered safe enough that locations, for example, geography and    netblock associated with the session are added to the safe locations    DB 155.

The information available in the safe locations DB 155 for a user islikely to grow over time as the user creates more and more sessions,similar to a learning system that increases its knowledge over time. Atypical user is likely to have a limited set of locations from where theuser connects. Over a significant time interval, there is a verysignificant chance that the user has connected from all usual locationsresulting in all the usual locations of the user being added to the safelocations DB 155. In less frequent cases when the user connects from anew location, enhanced authentication is required before determining thenew locations to be safe.

Using Safe Locations of a User's Connection

In one embodiment, the website 325 is a social networking website orotherwise maintains information 335 related to friends of the website'susers. In an embodiment, the website 325 may not maintain the socialnetwork information 335 but obtain the information from a socialnetworking system using an application programming interface (API)provided by the social networking system. As used herein, the term“friend” refers to any other user to whom a user has formed aconnection, association, or relationship via the social network. Theinformation related to a user's connections in a social network may beused to determine whether a session is legitimate or not. For example, auser is likely to use a computer belonging to a social networkconnection to create a session to the website 325. The user may havenever created a session from the computer in the past, but if thewebsite can determine that the computer has been used in the past by theuser's connections, the user session may be considered safe. In oneembodiment, a user session created from a geographical location fromwhere a large number of user's connections create sessions may beconsidered safe.

A social networking system stores significant information related to auser's connections that can be used to determine if a user session islegitimate or not. Users of the social networking system add connectionsto a number of other users to whom they desire to be connected.Connections may be added explicitly by a user, for example, the userselecting a particular other user to be a connection, or automaticallycreated by the social networking system based on common characteristicsof the users (e.g., users who are alumni of the same educationalinstitution). The social networking system keeps a record of informationfor each user and the connections among the users. The record of usersand their connections in the social networking system may be called a“social graph.”

Connections in social networks are usually in both directions, but theyneed not be, so the terms “user” and “friend” may depend on the frame ofreference. For example, if Bob and Joe are both users and connected toeach other in the website, Bob and Joe are also each other's friends.The connection between users may be a direct connection; however, someembodiments of a social networking system allow the connection to beindirect via one or more levels of connections. Also, the term friendneed not require that users actually be friends in real life; it simplyimplies a connection in the social network. A social networking systemprovides various mechanisms to its users to communicate with each otherand to obtain information about their connection that they might findinteresting, such as activities that their connections are involvedwith, applications that their connections are installing, and commentsmade by connections on activities of other connections. These mechanismsinclude email, notifications, newsfeeds and the like. Users of a socialnetworking system can view information related to other users, forexample, their profile information, photos, and the like. Interactionsbetween users on a social networking system may be analyzed to determineif two users are close connections or not. For example, two users withvery frequent interactions through emails or other activities in thesocial networking system are likely to be closer connections than userswith minimal activity between them.

Social graph information associated with a user may be used fordetermining safe locations for a user. For example, a location may beconsidered safe for a user if the location is known to be safe for oneof the connections of the user. A geographical location may beconsidered safe for a user if the geographical region is known to besafe for several of the user's connections. Similarly, a machine cookiecan be considered safe for a user if the machine cookie is known to be asafe location for a user's connection. In a situation where a locationis not known to be safe for a user but is known to be safe for theuser's connections, it is likely that the user is using a machine of aconnection or using a machine from the geographical location of theuser's connections. In some embodiments a score is assigned toconnections of a user to determine if the connections are close beforeusing the particular connection for determining safe locations. In someembodiments, heuristics may be used to determine how close a connectionis to a user before using the connection's information for determiningsafe locations. Distinction based on closeness of connections is usedbecause some users create a large number of connections spread across awide variety of locations. Such users can be potentially exploited byillegitimate users by becoming their connections in the socialnetworking system and being able to get added to the user's safelocations. Hence, the list of connections of a user may be restricted toconnections with whom the user has interactions indicative of a closefriendship, for example, connection with whom the user has frequentinteractions using messages, connections that have been tagged with theuser in the same photo, or other types of interactions. In someembodiments, a location may be considered safe for a user if thelocation is considered safe for any of the connections of the user orany of the connections of the connections of the user.

Enhanced Authentication Procedure

Allowing access to a session that is highly suspicious requires enhancedauthentication from the user. FIG. 5 illustrates a process in which thelevel of authentication required for a session is determined based onhow suspicious the session is considered. A session requesting 500access to information is analyzed by the session manager 135 todetermine 510 whether the session is suspicious or not. The sessionmanager 135 provides the information associated with the session to thesuspicious index manager 130 to determine a measure of suspiciousnessassociated with the session. If the session is determined to be notsuspicious, a simple authentication process 520, for example,authentication based on a login identifier and password may besufficient. On the other hand, if the session is determined to besuspicious, enhanced authentication 515 may be required based oninformation from the user. For example, as part of an enhancedauthentication process, the authentication manager 160 may request apreselected set of security related questions for which the user haspreviously provided answers or require the user to enter a security codethat is sent to the user through email or an SMS message sent to theuser's mobile phone. The success of the authentication procedure is usedto determine 525 the level of access to the user session. Access isallowed 530 if authentication succeeds and denied 535 otherwise. In someembodiments, a session that is not successfully authenticated may beallowed partial access, such that access to any sensitive information isdisallowed. Furthermore, a session that is not successfullyauthenticated may be monitored more closely for any suspicious activityand terminated if activities of the session are indicative of a behaviorconsidered not safe, for example, spamming.

Alternative Applications

The foregoing description of the embodiments of the invention has beenpresented for the purpose of illustration; it is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Persons skilled in the relevant art can appreciate that manymodifications and variations are possible in light of the abovedisclosure.

Some portions of this description describe the embodiments of theinvention in terms of algorithms and symbolic representations ofoperations on information. These algorithmic descriptions andrepresentations are commonly used by those skilled in the dataprocessing arts to convey the substance of their work effectively toothers skilled in the art. These operations, while describedfunctionally, computationally, or logically, are understood to beimplemented by computer programs or equivalent electrical circuits,microcode, or the like. Furthermore, it has also proven convenient attimes, to refer to these arrangements of operations as modules, withoutloss of generality. The described operations and their associatedmodules may be embodied in software, firmware, hardware, or anycombinations thereof.

Any of the steps, operations, or processes described herein may beperformed or implemented with one or more hardware or software modules,alone or in combination with other devices. In one embodiment, asoftware module is implemented with a computer program productcomprising a computer-readable medium containing computer program code,which can be executed by a computer processor for performing any or allof the steps, operations, or processes described.

Embodiments of the invention may also relate to an apparatus forperforming the operations herein. This apparatus may be speciallyconstructed for the required purposes, and/or it may comprise ageneral-purpose computing device selectively activated or reconfiguredby a computer program stored in the computer. Such a computer programmay be stored in a tangible computer readable storage medium or any typeof media suitable for storing electronic instructions, and coupled to acomputer system bus. Furthermore, any computing systems referred to inthe specification may include a single processor or may be architecturesemploying multiple processor designs for increased computing capability.

Embodiments of the invention may also relate to a computer data signalembodied in a carrier wave, where the computer data signal includes anyembodiment of a computer program product or other data combinationdescribed herein. The computer data signal is a product that ispresented in a tangible medium or carrier wave and modulated orotherwise encoded in the carrier wave, which is tangible, andtransmitted according to any suitable transmission method.

Finally, the language used in the specification has been principallyselected for readability and instructional purposes, and it may not havebeen selected to delineate or circumscribe the inventive subject matter.It is therefore intended that the scope of the invention be limited notby this detailed description, but rather by any claims that issue on anapplication based hereon. Accordingly, the disclosure of the embodimentsof the invention is intended to be illustrative, but not limiting, ofthe scope of the invention, which is set forth in the following claims.

What is claimed is:
 1. A computer implemented method comprising:receiving a request for creating a session from a computing device;identifying a location associated with the computing device originatingthe request; receiving a measure of reputation of the location, whereinthe measure of reputation of the location is determined based at leastin part on a set of past sessions of a plurality of other users thatoriginated from the location, the measure of reputation indicating thelocation as being safe if more than a threshold of past sessionscorrespond to benign requests, wherein a request is classified as abenign request if the request is for access to information of a user byanother user connected to the user via a social networking system;determining a level of authentication required from the sender of therequest based on the measure of reputation of the location; and sendinga request for authentication, wherein the information requested forauthentication is determined based on the determined level ofauthentication.
 2. The computer implemented method of claim 1, whereinthe measure of reputation of the location indicates an unsafe locationif a number of suspicious sessions originating from the location in thepast is above a predetermined threshold.
 3. The computer implementedmethod of claim 1, wherein the measure of reputation of the location isfurther based on a measure of reputation of a second location that iswithin a threshold distance of the location.
 4. The computer implementedmethod of claim 3, wherein the measure of reputation of the location isfurther determined based on a distance of the location from the secondlocation.
 5. The computer implemented method of claim 1, wherein a pastsession is determined to be suspicious if the past session wasassociated with an activity considered unsafe.
 6. The computerimplemented method of claim 1, wherein a past session is determined tobe suspicious if the past session was associated with an illegitimateactivity.
 7. The computer implemented method of claim 1, wherein a pastsession is determined to be suspicious if the past session sent arequest for access to information of a type classified as sensitiveinformation.
 8. The computer implemented method of claim 1, wherein apast session is determined to be suspicious if the past session failedan authentication.
 9. The computer implemented method of claim 1,further comprising: receiving a measure of reputation for each of aplurality of locations from a third-party service provider.
 10. Thecomputer implemented method of claim 1, further comprising: generating ameasure of reputation for each of a plurality of locations based onactions executed by previous sessions.
 11. The computer implementedmethod of claim 1, wherein the level of authentication required from thesender of the request comprises a captcha.
 12. The computer implementedmethod of claim 1, wherein the location is a geographical location. 13.The method of claim 1, wherein a benign request comprises a request foran image of another user with whom the user is directly connected in asocial networking system.
 14. The method of claim 1, wherein a benignrequest comprises a request for information classified as not sensitive.15. The method of claim 1, wherein a benign request comprises a requestto perform an action predetermined to be a legitimate action.
 16. Acomputer implemented method comprising: receiving information related toa plurality of sessions originating from a location, wherein a sessionoriginating from a location is created from device associated with thelocation; determining a measure of suspiciousness for each session inthe plurality of sessions based on actions associated with the sessionindicating authenticity of the session; determining a measure ofreputation of the location based on past sessions of a plurality ofother users originating from the location, wherein the measure ofreputation indicates the location as being safe if more than a thresholdpast sessions correspond to benign requests, wherein a request isclassified as a benign request if the request is for access toinformation of a user by another user connected to the user via a socialnetworking system; determining a level of authentication required forsessions originating from the location based on the reputation of thelocation; and storing the determined measure of reputation of thelocation in a computer readable medium.
 17. The computer implementedmethod of claim 16, wherein the location is a netblock and the sessionwas created from a network address in the netblock.
 18. The computerimplemented method of claim 16, wherein the location is a geographicallocation.
 19. The computer implemented method of claim 16, wherein theactions associated with the session indicating the authenticity of theuser creating the session comprise requests from the session attemptingto access information of a type classified as sensitive information. 20.The computer implemented method of claim 16, wherein the actionsassociated with the session indicating the authenticity of the usercreating the session comprise a failure of the session to provideauthentication information.
 21. A computer program product having anon-transitory computer-readable storage medium storingcomputer-executable code comprising: a session manager configured to:receive a request for creating a session from a computing device;identify a location associated with the computing device originating therequest; receive a measure of reputation of the location, wherein themeasure of reputation of the location is determined based at least inpart on past sessions of a plurality of other users that originated fromthe location, the measure of reputation indicating the location as beingsafe if more than a threshold past sessions correspond to benignrequests, wherein a request is classified as a benign request if therequest is for access to information of a user by another user connectedto the user via a social networking system; an authentication managerconfigured to: determine a level of authentication required from thesender of the request based on the measure of reputation of thelocation; and send a request for authentication, wherein the informationrequested for authentication is determined based on the determined levelof authentication.
 22. A computer program product having anon-transitory computer-readable storage medium storingcomputer-executable code comprising: a suspicious index managerconfigured to: receive information related to a plurality of sessionsoriginating from a location, wherein a session originating from alocation is created from device associated with the location; determinea measure of suspiciousness for each session in the plurality ofsessions based on actions associated with the session indicatingauthenticity of the session; determine a measure of reputation of thelocation based on an aggregate of measures of suspiciousness of sessionsof a plurality of other users originating from the location, wherein themeasure of reputation indicates the location as being safe if more thana threshold past sessions correspond to benign requests, wherein arequest is classified as a benign request if the request is for accessto information of a user by another user connected to the user via asocial networking system; determining a level of authentication requiredfor sessions originating from the location based on the reputation ofthe location; and store the determined measure of reputation of thelocation in a computer readable medium.